#include "geometry/wsymesh.h"
#include "wsymath/rotateBothAxises.h"

void WSYMesh::computeAngleOfEular() {
    double angleXInRadian = rotation[0],
           angleYInRadian = rotation[1],
           angleZInRadian = rotation[2];
    resetThreeDirections();
    rotateBothAxiesNew(angleXInRadian, dirX, dirY, dirZ);
    rotateBothAxiesNew(angleYInRadian, dirY, dirX, dirZ);
    rotateBothAxiesNew(angleZInRadian, dirZ, dirX, dirY);

    Matrix3D::appendValuesFloat(rotationMatrixNew,
            dirX[0], dirX[1], dirX[2], 0,
            dirY[0], dirY[1], dirY[2], 0,
            dirZ[0], dirZ[1], dirZ[2], 0,
            0, 0, 0, 1);
}
